<html>
<head> 
<script type='text/javascript' src='lib/js/jquery-1.3.2.min.js'></script>
<script type='text/javascript' src='lib/js/jquery.timers.js'></script>
<script type="text/javascript" src="lib/js/swfobject.js"></script>
<script type="text/javascript" src="lib/js/json/json2.js"></script>
<script type="text/javascript">
swfobject.embedSWF("lib/chart.swf", "my_chart", "100%", "230", "9.0.0","expressInstall.swf", {"data-file":"capturer.php"});
        var refresh = 5000;
        function get_data() {
                $.ajax({
			type: "POST",
			cache: false,
			url: 'capturer.php',
			success: function(data) {
				dato = eval('(' + data + ')');
			},
                        complete: function () {
                                $(this).oneTime(refresh, function() {
					open_flash_chart_data();
                                        get_data();
                                });
                        }

                })
        }

        $(document).ready(function() {
                get_data();
        });


function open_flash_chart_data()
{
	tmp = findSWF("my_chart");
	x = tmp.load(JSON.stringify(dato));
}

function findSWF(movieName) {
  if (navigator.appName.indexOf("Microsoft")!= -1) {
    return window[movieName];
  } else {
    return document[movieName];
  }
}
</script>
 
</head>
<body>
<div id="my_chart"></div>
 
 
</body>
</html>

